﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    public partial class ParamsArray : Form
    {
        private List<double> _list;
        public ParamsArray(out List<double> list)
        {
            InitializeComponent();
            list = new List<double>();
            _list = list;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            string[] str = textBox1.Text.Trim().Split(' ');
            foreach (string st in str)
            {
                double dd;
                if(double.TryParse(st, out dd))
                {
                    if(dd >= 0.0 && dd <= 1.0)
                        _list.Add(dd);
                }
            }
            this.Close();
        }
    }
}
